dojo.declare("MCustomerOrderHistoryPg", wm.Page, {
    start: function() {

    },
    "preferredDevice": "phone",

    list1OrderIdFormat: function(inValue, rowId, cellId, cellField, cellObj, rowObj) {
        var display = "<div class='MobileRowTitle'>Order#: " + rowObj.orderId + "</div>" + "<div class='MobileRow'>Order Date: " + wm.List.prototype.dateFormatter({
            "formatLength": "medium",
            "dateType": "date and time"
        }, null, null, null, rowObj.orderDt) + "</div>" + "<div class='MobileRow'>Status: " + rowObj.status + "</div>" + "<div class='MobileRow'>Vendor: " + rowObj.customerByVendorId.name + "</div>"
        if (rowObj.comments && rowObj.comments != null) {
            +"<div class='MobileRow'>Comments: " + rowObj.comments + "</div>"
        };
        return display;
    },
    list1Select2: function(inSender, inItem) {
        this.mobileIconButton1.setShowing(true);
        this.labelOrderItemDetails.setShowing(true);
        this.labelOrderDetails.setShowing(false);
    },
    mobileIconButton1Click1: function(inSender) {
        this.mobileIconButton1.setShowing(false);
        this.labelOrderItemDetails.setShowing(false);
        this.labelOrderDetails.setShowing(true);

    },
    list2OrderItemIdFormat: function(inValue, rowId, cellId, cellField, cellObj, rowObj) {
        var display = "<div class='MobileRowTitle'>Item Name: " + rowObj.items.itemName + "</div>" +
        "<div class='MobileRow'>Item Desc: " + rowObj.items.itemDesc +
        "</div>" + "<div class='MobileRow'>Quantity: " + rowObj.quantity +
        "</div>" + "<div class='MobileRow'>Price: " + rowObj.price + "</div>"
        if (rowObj.comments && rowObj.comments != null) {
            +"<div class='MobileRow'>Comments: " + rowObj.comments + "</div>"
        };
        return display;
    },
    _end: 0
});